﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using COFE.Core.Filter;

namespace COFE.Core
{
    /// <summary>
    /// Match entries that has the guid in the entry list.
    /// </summary>
    public class GuidEntryFilter : IEntryFilter
    {
        public GuidEntryFilter(params Guid[] entryGuids)
        {
            _entryGuids = entryGuids;
        }

        private Guid[] _entryGuids;

        public bool Matches(IInternalFileSystemInfoExA entry)
        {
            var eid = entry.GetHashGuid();
            foreach (var g in _entryGuids)
                if (g == eid)
                    return true;
            return false;
        }
    }
}
